//
//  TopWindow.m
//  HousingPoliceAssistant
//
//  Created by 云警01 on 2019/6/6.
//  Copyright © 2019 盛洋. All rights reserved.
//

#import "TopWindow.h"

static TopWindow *level2Window;
@implementation TopWindow

- (id)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
        self.windowLevel = UIWindowLevelStatusBar + 1;
        self.hidden = NO;
        self.backgroundColor = [UIColor clearColor];
        UITapGestureRecognizer *tapg = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(tapScrollToTop:)];
        [self addGestureRecognizer:tapg];
    }
    return self;
}
- (void)dealloc {
    NSLog(@"TopWindow dealloc");
}

#pragma mark 增加topWindow点击事件
- (void)tapScrollToTop:(UIGestureRecognizer *)recognizer {
    if (_topWindowTap != nil) {
        _topWindowTap();
    }
}

@end
